<template>
    <div class="goodsDesc-box">
        <h1>{{ goodsDesc.title }}</h1>

        <hr>

        <div v-html="goodsDesc.content" class="content"></div>
    </div>
</template>

<script>
import { Toast } from 'mint-ui';
export default {
    data() {
        return {
            goodsDesc: {}
        }
    },
    created () {
        this.getGoodsDesc()
    },
    methods: {
        getGoodsDesc(){
            this.$http.get('api/goods/getdesc/'+this.$route.params.id).then(res=>{
                if (res.body.status === 0) {
                    this.goodsDesc = res.body.message[0]
                } else {
                    Toast('图文介绍加载失败');
                }
            })
        }
    },
}
</script>

<style lang="less">
    .goodsDesc-box {
        padding: 10px;
        h1 {
            font-size: 16px;
            color: #26a2ff;
            text-align: center;
            padding: 15px 0;
        }
        .content {
            img {
                width: 100%;
            }
        }
        table{
            width: 100% !important;
        }
    }
</style>
